<?php
/**
 * 经纪人
 * User: E 房cms www.fangcms.com
 * Date: 2015/1/20
 * Time: 10:51
 */
namespace Wap\Controller;
use Org\Yike\FangCms;
use Org\Util\Page;
class AgencyController extends CommonController{
    public function _initialize(){
        parent::_initialize();
        $this->title = '经纪人';
    }

    public function index(){
        $FangCms = new FangCms();
        $this->rec_used = $FangCms->getRecUsed();
        //搜索分页
        $where = array('status'=>1,'cate_id'=>2);
        $count = M('user_info')->where($where)->count();
        $pager = new Page($count, 10);
        $this->list = M('user_info')->where($where)->limit($pager->firstRow.','.$pager->listRows)->order('login_time desc')->select();
        $this->page = $pager->show();
        $this->count = $count;
        $this->display();
    }


}